<%-- 
    Document   : DetailAdminCart
    Created on : Dec 11, 2012, 8:45:59 PM
    Author     : ITCreed
--%>

<%@page import="java.util.ArrayList"%>
<%@page import="java.util.List"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Search cart</title>
        <%@include file="../LayoutAdmin/InHead.jsp" %>
    </head>
    <body>
        <div id="horizontal_bar">
            <div id="wrapper">
                <%@include file="../LayoutAdmin/Top.jsp" %>
                <div id="middle">
                    <%@include file="../LayoutAdmin/Middle_Top.jsp" %>
                    <div class="right" style="float: none; width: 960px">
                        <form name="frmCartDetail" id="frmCartDetail" action="../../SearchCartServlet" method="POST">
                            <div style="text-align: center"><h1>Chi tiết giỏ hàng</h1></div>
                            <table class="Table3">
                                <tr>
                                    <th>Hình ảnh</th>
                                    <th>Tên sách</th>
                                    <th>Tác giả</th>
                                    <th>Nhà sản xuất</th>
                                    <th>Giá tiền</th>
                                    <th>Số lượng mua</th>
                                    <th>Thành tiền</th>
                                </tr>
                                <%
                                    BO.CartBO cartBO = new BO.CartBO();
                                    List listcart = new ArrayList<String>();

                                    String key = null;
                                    if (request.getQueryString() != null) {
                                        key = request.getQueryString().split("=")[1];
                                            listcart = cartBO.GetCartDetail(key);                                    
                                    } else {
                                        listcart = cartBO.GetAll();
                                    }

                                    for (int i = 0; i < listcart.size(); i++) {                                
                                %>
                                <tr>       
                                    <td colspan="7"><% out.println(listcart.get(i));%></td>
                                </tr>
                                <%
                                    }
                                %>
                            </table>
                        </form>
                    </div>
                </div>
                <%@include file="../LayoutUser/Bottom.jsp" %>
            </div>
        </div>
    </body>
</html>